import { Shape } from '@antv/x6'
import config from '../config'
import baseOptions from './baseOptions'

export const CustomCircle = Shape.Circle.define({
  constructorName: 'custom-circle',
  ...baseOptions,
  width: 70,
  height: 70,
  markup: [
    ...baseOptions.markup,
    {
      tagName: 'circle',
      selector: 'body'
    }
  ],
  attrs: {
    ...baseOptions.attrs,
    body: {
      rx: 35,
      ry: 35,
      stroke: config.nodeStroke,
      strokeWidth: config.nodeStrokeWidth,
      fill: config.nodeBgColor,
      magnet: true
    },
    data: {
      width: 70,
      height: 70,
      angle: 0
    }
  }
})
